Skip to content

feat: Improve pdata::otap::testing module and expose it to other crates#2349

Merged
albertlockett merged 3 commits intoopen-telemetry:mainfrom
JakeDern:otap-testing
Mar 17, 2026
Merged

feat: Improve pdata::otap::testing module and expose it to other crates#2349
albertlockett merged 3 commits intoopen-telemetry:mainfrom
JakeDern:otap-testing

Conversation

@JakeDern
Copy link
Contributor

@JakeDern JakeDern commented Mar 17, 2026

Change Summary

This is another PR on the path to #2289. During my initial implementation, I realized that a lot of tests were generating invalid otap batches. In order to make that easier, I've updated the logs/metrics/traces macros in the pdata crate to automatically fill in anything required to be spec compliant based on what's been specified. I had a half-baked version of this before, but now that we have the spec we can do this properly.

Additional changes:

  • Added an Into<OtapArrowRecords> trait bound to OtapBatchStore. From<Logs/Metrics/Traces> was already implemented, it's just useful to have in the bound.
  • added a testing feature which lets these be consumed across other crates.

What issue does this PR close?

How are these changes tested?

Unit.

Are there any user-facing changes?

No

@github-actions github-actions bot added the rust Pull requests that update Rust code label Mar 17, 2026
@codecov
Copy link

codecov bot commented Mar 17, 2026

Codecov Report

❌ Patch coverage is 97.79249% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.72%. Comparing base (245b5ac) to head (e7f8267).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #2349    +/-   ##
========================================
  Coverage   87.72%   87.72%            
========================================
  Files         577      578     +1     
  Lines      198206   198319   +113     
========================================
+ Hits       173873   173974   +101     
- Misses      23807    23819    +12     
  Partials      526      526            
Components Coverage Δ
otap-dataflow 89.75% <97.79%> (-0.01%) ⬇️
query_abstraction 80.61% <ø> (ø)
query_engine 90.61% <ø> (ø)
syslog_cef_receivers ∅ <ø> (∅)
otel-arrow-go 52.44% <ø> (ø)
quiver 91.91% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JakeDern JakeDern changed the title feat: Improve pdata::otap::testing module and expose it to other crates [WIP] feat: Improve pdata::otap::testing module and expose it to other crates Mar 17, 2026
@JakeDern
Copy link
Contributor Author

This is a stacked diff on #2346 and most commits belong to that PR. Will publish this after that goes in

@JakeDern JakeDern changed the title [WIP] feat: Improve pdata::otap::testing module and expose it to other crates feat: Improve pdata::otap::testing module and expose it to other crates Mar 17, 2026
@JakeDern JakeDern marked this pull request as ready for review March 17, 2026 19:53
@JakeDern JakeDern requested a review from a team as a code owner March 17, 2026 19:53
@albertlockett albertlockett added this pull request to the merge queue Mar 17, 2026
Merged via the queue into open-telemetry:main with commit 76e9428 Mar 17, 2026
68 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rust Pull requests that update Rust code

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants